package com.dayaokeji.server_api.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Gorden on 2018/5/5.
 */
public class SubjectAnswer implements Serializable {
    private static final long serialVersionUID = 7316013061121146182L;

    private int examQuestionId;
    private String answer = "";
    private String standardAnswer = "";
    private List<Integer> resourceList = new ArrayList<>();
    private List<String> chooseIndex = new ArrayList<>();

    public int getExamQuestionId() {
        return examQuestionId;
    }

    public void setExamQuestionId(int examQuestionId) {
        this.examQuestionId = examQuestionId;
    }

    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    public String getStandardAnswer() {
        return standardAnswer;
    }

    public void setStandardAnswer(String standardAnswer) {
        this.standardAnswer = standardAnswer;
    }

    public List<Integer> getResourceList() {
        return resourceList;
    }

    public void setResourceList(List<Integer> resourceList) {
        this.resourceList = resourceList;
    }

    public List<String> getChooseIndex() {
        return chooseIndex;
    }

    public void setChooseIndex(List<String> chooseIndex) {
        this.chooseIndex = chooseIndex;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof SubjectAnswer) {
            if (((SubjectAnswer) obj).examQuestionId == this.examQuestionId) {
                return true;
            }
        }
        return super.equals(obj);
    }

    @Override
    public int hashCode() {
        return 31 * examQuestionId;
    }
}
